package Value类型

import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}

object Opr2 {

    def main(args: Array[String]): Unit = {

        val config: SparkConf = new SparkConf().setMaster("local[*]").setAppName("WordCount")

        val sc = new SparkContext(config)

        val ArrayRDD: RDD[List[Int]] = sc.parallelize(Array(List(1, 2, 3), List(4)))


        val flatMapRDD: RDD[Int] = ArrayRDD.flatMap(x => x)

        flatMapRDD.collect().foreach(println)


    }

}
